package ldk.learn;

import org.junit.Test;

import java.util.HashMap;

public class MethodSmali {

    public void simpleSmali(){
        System.out.println("SimpleSmali");
    }

    public boolean simpleWithReturnAndArgs(String input){
        System.out.println(input);
        return true;
    }

    public synchronized void simpleWithSynchronized(){
        System.out.println("SimpleWithSynchronized");
    }

    public static synchronized void simpleWithStaticSynchronized(){
        System.out.println("SimpleWithStaticSynchronized");
    }

    public static void simpleWithTryCatch(){
        int firstValue = 10;
        HashMap map = new HashMap();
        map.remove("");
        try {
            int c = firstValue / 100;
        }catch (Exception e){
            System.out.println("Error: " + e.getMessage());
        }
    }

    public void simpleWithMultipleLocalVariable(boolean bol){
        int firstValue = 100;
        if (bol){
            int secondValue = 1001;
            System.out.println(secondValue);
        }else{
            int secondValue = 1002;
            System.out.println(secondValue);
        }
    }

    @Test
    public void test(){
        System.out.println("FINE");
    }
}
